﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wwtfly.BBS.Framework.Execption
{

    /// <summary>
    /// WWTFLY 异常
    /// </summary>
    public class WwtflyException : Exception
    {
        /// <summary>
        /// 异常编码
        /// </summary>
        public virtual string Code { get; set; }

        /// <summary>
        /// 异常信息
        /// </summary>
        public string MyMessage { get; set; }


        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="code"></param>
        /// <param name="message"></param>
        public WwtflyException(string code)
        {
            this.Code = code;
            this.MyMessage = string.Format("出现{0}异常!", code);
        }

        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="message"></param>
        /// <param name="inner"></param>
        public WwtflyException(string message, Exception inner)
            : base(message, inner)
        { }
        /// <summary>
        /// ctor
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected WwtflyException(
         System.Runtime.Serialization.SerializationInfo info,
         System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }
    }
}
